package com.ddl.common.enums;

/**
 * Created by Administrator on 2017/3/13 0013.
 */
public enum ErrorCode {

    RETURN_SUCCESS_0000("200", ResultType.SUCCESS.getCode(), "获取成功"),
    RETURN_ERROR_0033("999", ResultType.FAILED.getCode(), "返回结果异常"),

    //交易类
    BUSSINESS_ERROR_201("201", ResultType.FAILED.getCode(), "参数检验失败"),
    BUSSINESS_ERROR_202("202", ResultType.FAILED.getCode(), "解密失败"),
    BUSSINESS_ERROR_203("203", ResultType.PROCESSING.getCode(), "网络或服务器繁忙，请稍后重试"),
    BUSSINESS_ERROR_204("204", ResultType.FAILED.getCode(), "签名错误"),
    BUSSINESS_ERROR_205("205", ResultType.FAILED.getCode(), "数据库操作异常"),
    BUSSINESS_ERROR_206("206", ResultType.FAILED.getCode(), "订单不存在"),
    BUSSINESS_ERROR_207("207", ResultType.FAILED.getCode(), "加密失败"),
    BUSSINESS_ERROR_208("208", ResultType.FAILED.getCode(), "实体对象转换异常"),
    BUSSINESS_ERROR_209("209", ResultType.FAILED.getCode(), "redis服务异常"),
    BUSSINESS_ERROR_210("210", ResultType.FAILED.getCode(), "抱歉，种子还没有成熟"),
    //用户账户类
    ACCOUNT_ERROR_301("301", ResultType.FAILED.getCode(), "账户状态非正常"),
    ACCOUNT_ERROR_302("302", ResultType.FAILED.getCode(), "账户金额不足"),
    ACCOUNT_ERROR_303("303", ResultType.FAILED.getCode(), "该手机号尚未注册"),
    ACCOUNT_ERROR_304("304", ResultType.FAILED.getCode(), "用户名或者密码错误"),
    ACCOUNT_ERROR_305("305", ResultType.FAILED.getCode(), "田地已种满，请等待收货"),
    ACCOUNT_ERROR_306("306", ResultType.FAILED.getCode(), "交易密码校验失败"),
    ACCOUNT_ERROR_307("307", ResultType.FAILED.getCode(), "账户开户失败"),
    ACCOUNT_ERROR_308("308", ResultType.FAILED.getCode(), "田地金币已低于最小金额，请给主人留一点哦"),
    ACCOUNT_ERROR_309("309", ResultType.FAILED.getCode(), "添加的好友不存在"),
    ACCOUNT_ERROR_310("310", ResultType.FAILED.getCode(), "无该好友申请"),
    ACCOUNT_ERROR_311("311", ResultType.FAILED.getCode(), "对不起，你当前没有种子"),
    ACCOUNT_ERROR_312("312", ResultType.FAILED.getCode(), "商城中无此道具"),
    ACCOUNT_ERROR_313("313", ResultType.FAILED.getCode(), "好友家有狗"),
    ACCOUNT_ERROR_314("314", ResultType.FAILED.getCode(), "该田地不存在"),
    ACCOUNT_ERROR_315("315", ResultType.FAILED.getCode(), "邀请人不存在"),
    ACCOUNT_ERROR_316("316", ResultType.FAILED.getCode(), "自己不能添加自己为好友"),
    ACCOUNT_ERROR_317("317", ResultType.FAILED.getCode(), "对不起，你当前没有该道具"),
    ACCOUNT_ERROR_318("318", ResultType.FAILED.getCode(), "道具使用成功，但是好友狗没有打跑"),

    LOGIN_ERROR_401("-10001", ResultType.FAILED.getCode(), "登录过期，请重新登录"),
    OPTION_ERROR_402("402", ResultType.FAILED.getCode(), "操作超时，请尝试重新操作"),
    LOGIN_ERROR_403("403", ResultType.FAILED.getCode(), "您已被禁止登陆，请联系客服"),
    LOGIN_ERROR_405("-10001", ResultType.FAILED.getCode(), "您的账号已在其他移动设备登录，如不是您本人操作，建议您及时联系客服核实账户资金安全。"),
    MESSAGE_ERROR_406("406", ResultType.FAILED.getCode(), "短信验证码发送失败"),
    ESSAGE_ERROR_M407("407", ResultType.FAILED.getCode(), "短信验证码有误，请重新获取"),
    ESSAGE_ERROR_M408("408", ResultType.FAILED.getCode(), "该操作已超时，请重新操作"),
    ESSAGE_ERROR_M409("409", ResultType.FAILED.getCode(), "原密码输入错误"),
    ESSAGE_ERROR_M410("410", ResultType.FAILED.getCode(), "手机号已存在,请直接登录"),

    RP_ERROR_501("501", ResultType.FAILED.getCode(), "实人认证获取token异常"),
    RP_ERROR_503("503", ResultType.FAILED.getCode(), "实人认证失败"),
    RP_ERROR_502("502", ResultType.FAILED.getCode(), "该人已进行过实人认证，请勿重新认证"),
    RETURN_ERROR_601("601", ResultType.FAILED.getCode(), "删除Redis失败"),
    RETURN_ERROR_602("602", ResultType.FAILED.getCode(), "重复地址插入");
    private String code;
    private String type;
    private String message;

    ErrorCode(String code, String type, String message) {
        this.code = code;
        this.type = type;
        this.message = message;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
